In C#, the type of a variable can often be inferred by the compiler. The use of the [var keyword](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/implicitly-typed-local-variables)
allows you to avoid repeating the type name in a variable declaration and object instantiation because the declared type can often be inferred by the
compiler.
Additionally, initializations providing the default value can also be omitted, helping to make the code more concise and readable.
Unnecessarily verbose declarations and initializations should be simplified. Specifically, the following should be omitted when they can be
inferred:
- array element type
- array size
-
new DelegateType
-
new Nullable<Type>
- object or collection initializers ({})
- type of lambda expression parameters
- parameter declarations of anonymous methods when the parameters are not used.